package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.CustomerShadowInfoPinglunMapper;
import com.aidex.biz.domain.CustomerShadowInfoPinglun;
import com.aidex.biz.service.CustomerShadowInfoPinglunService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 客户跟进评论Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2024-03-12
 */
@Service
@Transactional(readOnly = true)
public class CustomerShadowInfoPinglunServiceImpl extends BaseServiceImpl<CustomerShadowInfoPinglunMapper, CustomerShadowInfoPinglun> implements CustomerShadowInfoPinglunService
{
    private static final Logger log = LoggerFactory.getLogger(CustomerShadowInfoPinglunServiceImpl.class);

    /**
     * 获取单条数据
     * @param customerShadowInfoPinglun 客户跟进评论
     * @return 客户跟进评论
     */
    @Override
    public CustomerShadowInfoPinglun get(CustomerShadowInfoPinglun customerShadowInfoPinglun)
    {
        CustomerShadowInfoPinglun dto = super.get(customerShadowInfoPinglun);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 客户跟进评论id
     * @return 客户跟进评论
     */
    @Override
    public CustomerShadowInfoPinglun get(String id)
    {
        CustomerShadowInfoPinglun dto = super.get(id);
        return dto;
    }


    /**
     * 查询客户跟进评论列表
     * @param customerShadowInfoPinglun 客户跟进评论
     * @return 客户跟进评论
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<CustomerShadowInfoPinglun> findList(CustomerShadowInfoPinglun customerShadowInfoPinglun)
    {
        return super.findList(customerShadowInfoPinglun);
    }

    /**
     * 分页查询客户跟进评论列表
     * @param customerShadowInfoPinglun 客户跟进评论
     * @return 客户跟进评论
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<CustomerShadowInfoPinglun> findPage(CustomerShadowInfoPinglun customerShadowInfoPinglun)
    {
        return super.findPage(customerShadowInfoPinglun);
    }

    /**
     * 保存客户跟进评论
     * @param customerShadowInfoPinglun
     * @return 结果
     */
    @Override
    public boolean save(CustomerShadowInfoPinglun customerShadowInfoPinglun)
    {
        return super.save(customerShadowInfoPinglun);
    }


    /**
     * 删除客户跟进评论信息
     * @param customerShadowInfoPinglun
     * @return 结果
     */
    @Override
    public boolean remove(CustomerShadowInfoPinglun customerShadowInfoPinglun)
    {
        return super.remove(customerShadowInfoPinglun);
    }

    /**
     * 批量删除客户跟进评论
     * @param ids 需要删除的客户跟进评论ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteCustomerShadowInfoPinglunByIds(String[] ids)
    {
        return mapper.deleteCustomerShadowInfoPinglunByIds(ids);
    }

    /**
     * 获取最大编号
     * @param customerShadowInfoPinglun 客户跟进评论
     * @return 结果
     */
    @Override
    public int findMaxSort(CustomerShadowInfoPinglun customerShadowInfoPinglun)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(customerShadowInfoPinglun));
    }
}
